#ifndef NETWORKSTREAMER_H
#define NETWORKSTREAMER_H

#include <QObject>
#include <QProcess>
#include <QString>

class NetworkStreamer : public QObject
{
    Q_OBJECT

public:
    explicit NetworkStreamer(QObject *parent = nullptr);
    ~NetworkStreamer();

    // 网络配置
    void setMulticastAddress(const QString& address, int port);

    // 推流控制
    bool initialize();
    bool startStreaming();
    void stopStreaming();
    bool isStreaming() const;

signals:
    void streamingStarted();
    void streamingStopped();
    void networkError(const QString& error);

private:
    void setupNetwork();

private:
    QProcess* streamingProcess;
    
    // 网络配置
    QString multicastAddress;
    int port;
    
    // 状态
    bool isStreamingFlag;
};

#endif // NETWORKSTREAMER_H
